<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/admin/assets/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/admin/assets/css/slideshow.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">轮播图管理
            <input type="file" multiple style="display: none;">
            <button type="button" class="layui-btn layui-btn-normal">上传图片</button>
        </div>
        <div class="layui-card-body">

            <table class="layui-table">
                <colgroup>
                    <col width="9%">
                    <col width="27%">
                    <col width="34%">
                    <col width="15%">
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>图片预览</th>
                        <th>图片路径</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
        </div>
    </div>
</body>
<script type="text/html" id="add">
    {{each data item}}
    <tr>
        <td>{{item.id}}</td>
        <td><img src="http://localhost:8888/uploads/{{item.swiperimg}}" alt=""></td>
        <td>{{item.swiperimg}}</td>
        <td id='button'>
            {{if item.swiperstatus==1}}
            <button type="button" id={{item.id}} class="one layui-btn layui-btn-xs " value='2'>√</button> {{else}}
            <button type="button" id={{item.id}} class="one layui-btn layui-btn-xs " value='1' style='background:red'>×</button> {{/if}}
        </td>
        <td><button type="button" class="layui-btn layui-btn-sm layui-btn-danger" id={{item.id}}>删除</button></td>
    </tr>
    {{/each}}
</script>
<script src="/admin/assets/lib/jquery.js"></script>
<script src="/admin/assets/lib/template-web.js"></script>
<script src="/admin/assets/lib/layui/layui.all.js"></script>
<script src="/admin/assets/js/common.js"></script>
<script src="/admin/assets/js/slideshow.js"></script>

</html>